package com.oceansoft.mobile.econsole.modules.sys.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.oceansoft.mobile.econsole.modules.sys.entity.ParamInfo;
import com.oceansoft.mobile.econsole.modules.sys.persistence.IParamMapper;
import com.oceansoft.mobile.econsole.modules.sys.service.IParamService;

@Service
public class ParamServiceImpl implements IParamService {
	@Resource
	IParamMapper paramMapper;

	@Override
	@Transactional
	public void saveParam(ParamInfo param) {
		paramMapper.insert(param);

	}

	@Override
	@Transactional
	public void deleteParam(int apiId) {
		paramMapper.delete(apiId);

	}

	@Override
	public int countParam(int apiId) {
		return paramMapper.count(apiId);
	}

	@Override
	public List<ParamInfo> findParam(int apiId) {
		return paramMapper.findParamByApiId(apiId);
	}

	@Override
	public List<ParamInfo> findAllParams(int apiId) {
		return paramMapper.findAllParams(apiId);
	}

	@Override
	public void updateParam(ParamInfo param) {
		paramMapper.updateParamInfo(param);
		
	}

}
